package com.jy.api.dao;

import com.jy.api.domain.Material;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.CrudRepository;

/**
 * Created by lihu on 2017/11/11.
 */
public interface MaterialDao extends CrudRepository<Material, String> {

    Material findByStoreIdAndNameAndEnabled(String storeId, String name, boolean enabled);


    Page<Material> findByStoreId(String storeId, Pageable pageable);


    Page<Material> findByStoreIdAndSearchCodeLike(String storeId, String code, Pageable pageable);
}
